Spawns one one-shot burst of a particle system at (x, y) - a hit spark, a puff of dust, a splash. Fire-and-forget: the burst finishes and cleans itself up, so there is no handle and nothing to stop.
Works differently on Game Boy - The Game Boy draws 10 sprites on one line, so a burst of more particles is thinned out, and they are drawn solid, without turning or changing size.
Works differently on Game Boy Color - The Game Boy Color draws 10 sprites on one line, so a burst of more particles is thinned out, and they are drawn solid, without turning or changing size.
On other consoles this differs: see Side by side and How the consoles differ.
effect_burst(sys, x, y)| Name | Type |
|---|---|
sys | effect |
x | real |
y | real |
Nothing.
Spawns one one-shot burst of the effect sys at (x, y) - an explosion, a puff of dust on landing, a shower of sparks on impact - and forgets about it: nothing is kept to stop it early, since a burst is meant to finish on its own. sys is an effect declared in the project's Particles tab (effects/<name>.json) and referenced here by its bare name, the same way a sprite or a room is. See Particles and lighting for how an effect is authored and the budgets a burst shares with every other effect running.
x and y are a place in the room, counted from the room's top-left corner, the same way an instance's own x and y are counted.
There is one exception, an effect made camera-space in the Particles tab ("cameraSpace": true in its effects/<name>.json). That is the kind you use for rain or snow, which follows the screen instead of sitting in the room. For a camera-space effect, x and y count from where the view begins, which is the top-left pixel of the screen: (0, 0) is the screen's top-left corner, whatever part of the room the camera is looking at. (In an older project that still counts from the middle, the same numbers counted from the middle of the view.) A cutscene's effect step set to the camera's space counts the same way.
A burst has no owner and nothing about it can be stopped, moved or queried once it is fired - every particle it spawns lives out its own authored life and disappears. That is the entire point: something with a beginning, middle and end that happens once (a hit spark, a coin popping out of a broken pot) never needs the bookkeeping a running system would.
If what you actually want is something that keeps emitting until you say otherwise - a torch, a waterfall, anything ongoing - reach for effect_start instead, which keeps running for as long as the instance that started it does.
effect_burst(fx_doc_spark, x, y);A one-shot burst of sparks at this instance's own position. A real project would normally fire this from somewhere conditional - a collision, a pickup, the end of an animation - rather than every Step; this page's own example runs unconditionally purely so it has something to check.
Every particle a burst spawns comes out of the same project-wide pool every other effect shares, and a burst that fires while that pool is already full simply spawns fewer particles than authored, never an error. A rotated or scaled particle (Affine, authored per emitter) additionally wants a hardware matrix from the same shared pool every other rotated/scaled sprite in the room draws from; past that budget it falls back to a shared, quantized matrix and then to plain flips. See Budgets.
Every particle is a real hardware sprite, so a burst spends from the same 128-sprite ceiling everything else on screen is using. The engine caps itself rather than overrunning it (max_effect_particles/max_effect_systems_live, engine/include/gbml/config.h) and an over-budget spawn is quietly dropped - never an error, never a crash, so a too-generous burst thins out instead of breaking. The GBA has no per-sprite alpha, so `fade_out` is faked by flickering a particle off on alternating frames as it dies, not by dissolving it. A rotated or scaled particle wants a hardware affine matrix, of which there are only 32 for the whole screen: past the effect budget the engine falls back to a shared quantized matrix, then to plain flips.